Skip to content

Instantly share code, notes, and snippets.

@isciurus
isciurus / gist:5437231
Last active May 12, 2024 23:53
GIF packer, used to embed the javascript payload inside the picture and to exploit the Facebook OAuth XSS. Crafted from what I had found across open-source encoders. More reading: http://isciurus.blogspot.ru/2013/04/a-story-of-9500-bug-in-facebook-oauth-20.html
<html lang="en">
<head>
<script>
function str2hex(str)
{
var out_str = " ";
for(var i = 0; i < str.length; i++)
{
@daveklotz
daveklotz / daily-sheet-generation.py
Created July 31, 2021 19:48
Generate the data and run the ANN so I can get picks for today's games
######
# NOTE: this includes calculaiton for my first Wins Above Replacement approach, as well as the current DRA- approach
######
games = mlbgame.day(2021,7,30)
daily_game_id = 1
unique_row_id = 1. # just to make sure i have the same format as legacy spreadsheet
location_index = 0
@isciurus
isciurus / keybase.md
Created January 22, 2019 23:21
keybase.md

Keybase proof

I hereby claim:

  • I am isciurus on github.
  • I am iscisc (https://keybase.io/iscisc) on keybase.
  • I have a public key ASCNaPKYR_fYHt1n4meJtbYKDSmh45T6vPMvW41rSHuyHwo

To claim this, I am signing this object:

@isciurus
isciurus / MainActivity.java
Last active May 12, 2024 23:45
PoC for Android GoogleAuthUtil.getToken() bug
package com.isciurus.oauth_poc;
import java.io.IOException;
import java.text.DateFormat;
import java.util.Date;
import com.google.android.gms.auth.GoogleAuthException;
import com.google.android.gms.auth.GoogleAuthUtil;
import com.google.android.gms.auth.UserRecoverableAuthException;
import android.accounts.AccountManager;
import android.app.Activity;
@basoro
basoro / proxmox-proxy
Created May 25, 2019 20:45
Running Proxmox behind a single IP address
I ran into the battle of running all of my VMs and the host node under a single public IP address. Luckily, the host is just pure Debian, and ships with iptables.
What needs to be done is essentially to run all the VMs on a private internal network. Outbound internet access is done via NAT. Inbound access is via port forwarding.
Network configuration
Here’s how it’s done:
Create a virtual interface that serves as the gateway for your VMs:
@growlnx
growlnx / CMakeLists.txt
Last active May 12, 2024 23:37
GLIB with cmake
PROJECT(project C)
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
FIND_PACKAGE(PkgConfig REQUIRED)
PKG_CHECK_MODULES(GLIB REQUIRED glib-2.0)
INCLUDE_DIRECTORIES(
src/include/
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 12, 2024 23:28
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@travisstaloch
travisstaloch / fields.zig
Last active May 12, 2024 23:19
zig iterate over struct fields and print
const std = @import("std");
test "fields" {
const U1s = packed struct {
a: u1,
b: u1,
c: u1,
};
const x = U1s{ .a = 1, .b = 0, .c = 0 };
docker rm --force $(docker ps --all --quiet); docker rmi --force $(docker images --all --quiet); docker volume rm $(docker volume ls --quiet)
#!/usr/bin/env bash
set -eu
DIRNAME="$(realpath "$(dirname -- "${BASH_SOURCE[0]}")")"
PROJECT_ROOT="$(realpath "${DIRNAME}/..")"